/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * NuevoLlamado.java
 *
 * Created on 19-ene-2013, 12:58:01
 */
package gui;

import com.sun.awt.AWTUtilities;
import controladores.ControladorPrincipal;
import io.Llamado;
import io.Operador;
import java.awt.Image;
import java.awt.Shape;
import java.awt.geom.RoundRectangle2D;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JSpinner;
import javax.swing.SpinnerDateModel;
import javax.swing.table.DefaultTableModel;
import utilidades.JFrameConFondo;

/**
 *
 * @author NiCo
 */
public class NuevoLlamado extends JFrameConFondo {

    private Image icono = new ImageIcon(getClass().getResource("/imagenes/logo.png")).getImage();
    private SimpleDateFormat sdf = new java.text.SimpleDateFormat("dd/MM/yyyy");
    private SimpleDateFormat sdf1 = new java.text.SimpleDateFormat("HH:mm");

    /** Creates new form NuevoLlamado */
    public NuevoLlamado() {
        initComponents();
        SpinnerDateModel sm = new SpinnerDateModel(new Date(), null, null, Calendar.HOUR_OF_DAY);
        dtpHora.setModel(sm);
        JSpinner.DateEditor de = new JSpinner.DateEditor(dtpHora, "HH:mm");
        dtpHora.setEditor(de);
        cboOperador.setModel(new DefaultComboBoxModel(ControladorPrincipal.getInstance().getControladorPersonas().listaOperadores().toArray()));
        cboOperador.setSelectedIndex(-1);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btnCerrar = new javax.swing.JButton();
        btnMinimizar = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tlbLlamados = new javax.swing.JTable();
        btnAgregar = new javax.swing.JButton();
        btnEliminar = new javax.swing.JButton();
        btnGuardar = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        cboOperador = new javax.swing.JComboBox();
        dtpHora = new javax.swing.JSpinner();
        dtpFecha = new com.toedter.calendar.JDateChooser();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        chkInfoAse = new javax.swing.JCheckBox();
        chkInsMun = new javax.swing.JCheckBox();
        chkParticular = new javax.swing.JCheckBox();
        chkBroma = new javax.swing.JCheckBox();
        jLabel6 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        btnCerrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/cerrar-normal.png"))); // NOI18N
        btnCerrar.setBorder(null);
        btnCerrar.setBorderPainted(false);
        btnCerrar.setFocusPainted(false);
        btnCerrar.setName("btnCerrar"); // NOI18N
        btnCerrar.setOpaque(false);
        btnCerrar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btnCerrarMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                btnCerrarMouseExited(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnCerrarMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                btnCerrarMouseReleased(evt);
            }
        });
        btnCerrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCerrarActionPerformed(evt);
            }
        });

        btnMinimizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/minimizar-normal.png"))); // NOI18N
        btnMinimizar.setBorder(null);
        btnMinimizar.setBorderPainted(false);
        btnMinimizar.setFocusPainted(false);
        btnMinimizar.setName("btnMinimizar"); // NOI18N
        btnMinimizar.setOpaque(false);
        btnMinimizar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btnMinimizarMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                btnMinimizarMouseExited(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnMinimizarMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                btnMinimizarMouseReleased(evt);
            }
        });
        btnMinimizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMinimizarActionPerformed(evt);
            }
        });

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/titulo-nuevo-llamado.png"))); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        tlbLlamados.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Operador", "Fecha", "Hora", "Inform. asesor.", "Inst. munic.", "Particular", "Broma/Otros"
            }
        ));
        tlbLlamados.setName("tlbLlamados"); // NOI18N
        jScrollPane1.setViewportView(tlbLlamados);

        btnAgregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/agregar-llamado.png"))); // NOI18N
        btnAgregar.setBorderPainted(false);
        btnAgregar.setFocusPainted(false);
        btnAgregar.setName("btnAgregar"); // NOI18N
        btnAgregar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarActionPerformed(evt);
            }
        });

        btnEliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/eliminar-llamado.png"))); // NOI18N
        btnEliminar.setBorderPainted(false);
        btnEliminar.setFocusPainted(false);
        btnEliminar.setName("btnEliminar"); // NOI18N
        btnEliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEliminarActionPerformed(evt);
            }
        });

        btnGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/guardar-usuario.png"))); // NOI18N
        btnGuardar.setBorderPainted(false);
        btnGuardar.setFocusPainted(false);
        btnGuardar.setName("btnGuardar"); // NOI18N
        btnGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarActionPerformed(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Datos del llamado", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        jPanel1.setName("jPanel1"); // NOI18N

        cboOperador.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboOperador.setName("cboOperador"); // NOI18N

        dtpHora.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        dtpHora.setName("dtpHora"); // NOI18N

        dtpFecha.setDateFormatString("dd/MM/yyyy");
        dtpFecha.setFont(new java.awt.Font("Tahoma", 0, 12));
        dtpFecha.setName("dtpFecha"); // NOI18N

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel4.setText("Hora");
        jLabel4.setName("jLabel4"); // NOI18N

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel5.setText("Operador/a");
        jLabel5.setName("jLabel5"); // NOI18N

        chkInfoAse.setFont(new java.awt.Font("Tahoma", 0, 12));
        chkInfoAse.setText("Inform. asesoramiento");
        chkInfoAse.setName("chkInfoAse"); // NOI18N

        chkInsMun.setFont(new java.awt.Font("Tahoma", 0, 12));
        chkInsMun.setText("Institución municipal");
        chkInsMun.setName("chkInsMun"); // NOI18N

        chkParticular.setFont(new java.awt.Font("Tahoma", 0, 12));
        chkParticular.setText("Particular");
        chkParticular.setName("chkParticular"); // NOI18N

        chkBroma.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        chkBroma.setText("Broma / Otros");
        chkBroma.setName("chkBroma"); // NOI18N

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel6.setText("Fecha");
        jLabel6.setName("jLabel6"); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(chkInfoAse)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 64, Short.MAX_VALUE)
                        .addComponent(chkInsMun)
                        .addGap(53, 53, 53)
                        .addComponent(chkParticular)
                        .addGap(63, 63, 63)
                        .addComponent(chkBroma))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cboOperador, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(48, 48, 48)
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dtpFecha, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(47, 47, 47)
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dtpHora, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel4)
                        .addComponent(dtpHora, javax.swing.GroupLayout.PREFERRED_SIZE, 21, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cboOperador, javax.swing.GroupLayout.DEFAULT_SIZE, 21, Short.MAX_VALUE)
                            .addComponent(jLabel6))
                        .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING))
                    .addComponent(dtpFecha, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 21, Short.MAX_VALUE))
                .addGap(13, 13, 13)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(chkInfoAse)
                    .addComponent(chkBroma)
                    .addComponent(chkParticular)
                    .addComponent(chkInsMun))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(270, 270, 270)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 216, Short.MAX_VALUE)
                        .addComponent(btnMinimizar)
                        .addGap(6, 6, 6)
                        .addComponent(btnCerrar))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 668, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addContainerGap(536, Short.MAX_VALUE)
                        .addComponent(btnGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(274, 274, 274)
                        .addComponent(btnAgregar, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(275, 275, 275)
                        .addComponent(btnEliminar, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnMinimizar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnCerrar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnAgregar, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnEliminar, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addComponent(btnGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnCerrarMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMouseEntered

        btnCerrar.setIcon(new ImageIcon(getClass().getResource("/imagenes/cerrar-activo.png")));     }//GEN-LAST:event_btnCerrarMouseEntered

    private void btnCerrarMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMouseExited

        btnCerrar.setIcon(new ImageIcon(getClass().getResource("/imagenes/cerrar-normal.png")));     }//GEN-LAST:event_btnCerrarMouseExited

    private void btnCerrarMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMousePressed

        btnCerrar.setIcon(new ImageIcon(getClass().getResource("/imagenes/cerrar-click.png")));     }//GEN-LAST:event_btnCerrarMousePressed

    private void btnCerrarMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMouseReleased

        btnCerrar.setIcon(new ImageIcon(getClass().getResource("/imagenes/cerrar-normal.png")));     }//GEN-LAST:event_btnCerrarMouseReleased

    private void btnMinimizarMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnMinimizarMouseEntered

        btnMinimizar.setIcon(new ImageIcon(getClass().getResource("/imagenes/minimizar-activo.png")));     }//GEN-LAST:event_btnMinimizarMouseEntered

    private void btnMinimizarMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnMinimizarMouseExited

        btnMinimizar.setIcon(new ImageIcon(getClass().getResource("/imagenes/minimizar-normal.png")));     }//GEN-LAST:event_btnMinimizarMouseExited

    private void btnMinimizarMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnMinimizarMousePressed

        btnMinimizar.setIcon(new ImageIcon(getClass().getResource("/imagenes/minimizar-click.png")));     }//GEN-LAST:event_btnMinimizarMousePressed

    private void btnMinimizarMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnMinimizarMouseReleased

        btnMinimizar.setIcon(new ImageIcon(getClass().getResource("/imagenes/minimizar-normal.png")));     }//GEN-LAST:event_btnMinimizarMouseReleased

    private void btnMinimizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMinimizarActionPerformed

        this.setExtendedState(Principal.ICONIFIED);     }//GEN-LAST:event_btnMinimizarActionPerformed

    private void btnCerrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCerrarActionPerformed
        this.dispose();
    }//GEN-LAST:event_btnCerrarActionPerformed

    private void btnAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarActionPerformed
        if (cboOperador.getSelectedIndex() != -1 && dtpFecha.getDate() != null && dtpHora.getValue() != null) {
            Llamado llamado = new Llamado();
            llamado.setFecha(dtpFecha.getDate());
            llamado.setHora((Date) dtpHora.getValue());
            llamado.setOperador((Operador) cboOperador.getSelectedItem());
            llamado.setPendiente(false);
            llamado.setBroma_otros(chkBroma.isSelected());
            llamado.setInfo_asesoramiento(chkInfoAse.isSelected());
            llamado.setInstitucion(chkInsMun.isSelected());
            llamado.setParticular(chkParticular.isSelected());

            DefaultTableModel modelo = (DefaultTableModel) tlbLlamados.getModel();
            Object[] obj = new Object[7];
            obj[0] = llamado;
            obj[1] = sdf.format(llamado.getFecha());
            obj[2] = sdf1.format(llamado.getHora());
            if (llamado.isInfo_asesoramiento()) {
                obj[3] = "SI";
            } else {
                obj[3] = "NO";
            }
            if (llamado.isInstitucion()) {
                obj[4] = "SI";
            } else {
                obj[4] = "NO";
            }
            if (llamado.isParticular()) {
                obj[5] = "SI";
            } else {
                obj[5] = "NO";
            }
            if (llamado.isBroma_otros()) {
                obj[6] = "SI";
            } else {
                obj[6] = "NO";
            }
            modelo.addRow(obj);

            cboOperador.setSelectedIndex(-1);
            dtpFecha.setDate(null);
            chkBroma.setSelected(false);
            chkInfoAse.setSelected(false);
            chkInsMun.setSelected(false);
            chkParticular.setSelected(false);
        } else {
            MensajesInfo p1 = new MensajesInfo('e', "CamposVacios");
            p1.setLocationRelativeTo(null);
            p1.setIconImage(icono);
            p1.setVisible(true);
            Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
            AWTUtilities.setWindowShape(p1, shape);
        }
    }//GEN-LAST:event_btnAgregarActionPerformed

    private void btnEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarActionPerformed
        DefaultTableModel modelo = (DefaultTableModel) tlbLlamados.getModel();
        if (tlbLlamados.getSelectedRow() != -1) {
            modelo.removeRow(tlbLlamados.getSelectedRow());
        }
    }//GEN-LAST:event_btnEliminarActionPerformed

    private void btnGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarActionPerformed
        if (tlbLlamados.getRowCount() > 0) {
            for (int i = 0; i < tlbLlamados.getRowCount(); i++) {
                Llamado llamado = (Llamado) tlbLlamados.getValueAt(i, 0);
                ControladorPrincipal.getInstance().guardar(llamado);
            }
            MensajesInfo p1 = new MensajesInfo('n', "GuardarExito");
            p1.setLocationRelativeTo(null);
            p1.setIconImage(icono);
            p1.setVisible(true);
            Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
            AWTUtilities.setWindowShape(p1, shape);

            this.dispose();
        } else {
            MensajesInfo p1 = new MensajesInfo('n', "NuevoLlamado");
            p1.setLocationRelativeTo(null);
            p1.setIconImage(icono);
            p1.setVisible(true);
            Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
            AWTUtilities.setWindowShape(p1, shape);
        }
    }//GEN-LAST:event_btnGuardarActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAgregar;
    private javax.swing.JButton btnCerrar;
    private javax.swing.JButton btnEliminar;
    private javax.swing.JButton btnGuardar;
    private javax.swing.JButton btnMinimizar;
    private javax.swing.JComboBox cboOperador;
    private javax.swing.JCheckBox chkBroma;
    private javax.swing.JCheckBox chkInfoAse;
    private javax.swing.JCheckBox chkInsMun;
    private javax.swing.JCheckBox chkParticular;
    private com.toedter.calendar.JDateChooser dtpFecha;
    private javax.swing.JSpinner dtpHora;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable tlbLlamados;
    // End of variables declaration//GEN-END:variables
}
